package com.hexacta.hrs.domain.employee.history;

import java.util.Date;

import org.vectrics.common.db.AbstractRecordObject;
import org.vectrics.recruiter.job.JobFunction;
import org.vectrics.recruiter.job.JobTerm;

/**
 * Rol de trabajo asignado a un empleado.
 * 
 * @author jallik
 * 
 */
public class CareerRole extends AbstractRecordObject implements EffectiveCondition {

	private Date effectiveDate;
	private JobTerm condition;
	private JobFunction careerRole;
	private Long careerRolePosition;

	@Override
	public Date getEffectiveDate() {
		return this.effectiveDate;
	}

	@Override
	public void setEffectiveDate(final Date effectiveDate) {
		this.effectiveDate = effectiveDate;
	}

	public JobTerm getCondition() {
		return condition;
	}

	public void setCondition(JobTerm condition) {
		this.condition = condition;
	}

	public JobFunction getCareerRole() {
		return careerRole;
	}

	public void setCareerRole(JobFunction careerRole) {
		this.careerRole = careerRole;
	}

	public Long getCareerRolePosition() {
		return careerRolePosition;
	}

	public void setCareerRolePosition(Long careerRolePosition) {
		this.careerRolePosition = careerRolePosition;
	}

    @Override
    public int compareTo(EffectiveCondition o) {
        return this.getEffectiveDate().compareTo(o.getEffectiveDate());
    }

}
